<template>
  <div v-if="mdShow">
    <div style="display: block;" class="modal fade in" tabindex="-1">
      <div class="modal-dialog" role="document">
        <div class="modal-content">
          <div class="modal-header">
            <button @click="closeModel" type="button" class="close"><span
              aria-hidden="true">&times;</span></button>
            <div>
              <slot name="title"></slot>
            </div>
          </div>
          <div class="modal-body">
            <div>
              <slot name="msg"></slot>
            </div>
            <div>
              <slot name="btnGroup"></slot>
            </div>
          </div>
        </div>
      </div>
    </div>
    <div @click="closeModel" class="modal-backdrop fade in"></div>
  </div>

</template>

<script>
  export default {
    name: "model",
    props: {
      'mdShow': {
        type: Boolean
      }
    },
    methods:{
      closeModel:function () {
         this.$emit('close');
         // trigger('click')
      }
    }
  }
</script>

<style scoped>

</style>
